package com.gcb.thread;
public class StaticSyncBlock  extends Thread
{  
    public static StaticSyncBlock instance;   
    public StaticSyncBlock()  
    {  
        instance = this;  
    }  
    public static void method1()  
    {  
       synchronized(instance.getClass())  
       {  
              System.out.println("method");
              while(true){
            	  
              }
       }  
    }  
     
    public void run(){
    	method1();
    }
    
    public static void main(String[] args) {
		new StaticSyncBlock().start();
		new StaticSyncBlock().start();
		
	}
}  